package com.bdqn.mr.fullsort;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class FlowReducer extends Reducer<FlowBean, Text, Text, FlowBean> {
    // 输出的结果：
    // 13560436666     1116     954      2070
    // 手机号码        上行流量 下行流量 总流量
    private final static FlowBean flowBean = new FlowBean();

    @Override
    protected void reduce(FlowBean key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
        for (Text phone : values) {
            context.write(phone, key);
        }
    }
}
